import 'package:flutter/material.dart';
import 'package:node_chat/CustomUI/StatusPage/HeadOwnStatus.dart';
import 'package:node_chat/CustomUI/StatusPage/OthersStatus.dart';

class StatusPage extends StatefulWidget {
  const StatusPage({super.key});

  @override
  State<StatusPage> createState() => _StatusPageState();
}

class _StatusPageState extends State<StatusPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      floatingActionButton: Column(
        mainAxisAlignment: MainAxisAlignment.end,
        children: [
          SizedBox(
            height: 48,
            child: FloatingActionButton(
              backgroundColor: Colors.blueGrey[100],
              elevation: 8,
              onPressed: () {},
              child: const Icon(
                Icons.edit,
                color: Colors.blueGrey,
              ),
            ),
          ),
          const SizedBox(
            height: 13,
          ),
          FloatingActionButton(
            onPressed: () {},
            backgroundColor: Colors.greenAccent[700],
            elevation: 5,
            child: const Icon(Icons.camera_alt),
          )
        ],
      ),
      body: SingleChildScrollView(
        child: Column(children: [
          // SizedBox(
          //   height: 10,
          // ),
          const HeadOwnStatus(),
          label('recent updates'),
          const OthersStatus(
            name: 'Dev1',
            time: '17:00',
            imageName: 'assets/2.jpeg',
            isSeen: false,
            statusNum: 1,
          ),
          const OthersStatus(
            name: 'Dev2',
            time: '17:00',
            imageName: 'assets/3.jpg',
            isSeen: false,
            statusNum: 1,
          ),
          const OthersStatus(
            name: 'Dev3',
            time: '17:00',
            imageName: 'assets/1.jpg',
            isSeen: false,
            statusNum: 1,
          ),
          const SizedBox(
            height: 10,
          ),
          label('views updates'),
          const OthersStatus(
            name: 'Dev1',
            time: '17:00',
            imageName: 'assets/2.jpeg',
            isSeen: true,
            statusNum: 1,
          ),
          const OthersStatus(
            name: 'Dev2',
            time: '17:00',
            imageName: 'assets/3.jpg',
            isSeen: true,
            statusNum: 2,
          ),
          const OthersStatus(
            name: 'Dev3',
            time: '17:00',
            imageName: 'assets/1.jpg',
            isSeen: true,
            statusNum: 10,
          ),
        ]),
      ),
    );
  }

  Widget label(String labelname) {
    return Container(
      height: 33,
      width: MediaQuery.of(context).size.width,
      color: Colors.grey[300],
      child: Padding(
        padding: const EdgeInsets.symmetric(horizontal: 13, vertical: 7),
        child: Text(
          labelname,
          style: const TextStyle(fontSize: 13, fontWeight: FontWeight.bold),
        ),
      ),
    );
  }
}
